package com.sky.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sky.annotation.AutoFill;
import com.sky.entity.Category;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author luo20
* @description 针对表【category(菜品及套餐分类)】的数据库操作Mapper
* @createDate 2025-07-06 12:49:34
* @Entity com.sky.entity.Category
*/
public interface CategoryMapper extends BaseMapper<Category> {
    /**
     * 根据类型查询分类
     * @param type
     * @return
     */
    List<Category> selectByType(Integer type);

    /**
     * 添加分类
     * @param category
     * @return
     */
    @AutoFill(value = OperationType.INSERT)
    Integer insertCategory(Category category);

    /**
     * 更新分类状态
     * @param category
     * @return
     */
    @AutoFill(value = OperationType.UPDATE)
    Integer updateCategory(Category category);
}




